<?php
    $this->layout('error.phtml', [
        'title' => _('Unauthorized'),
        'error' => $error,
    ]);
?>

<div class="section">
    <h1>
        <?= _('You must be connected to see this page.') ?>
    </h1>

    <?php if (isset($details)): ?>
        <p class="section__intro">
            <?= $details ?>
        </p>
    <?php endif; ?>

    <p>
        <?php if (isset($link_to)): ?>
            <a href="<?= $link_to ?>">
                <?= _('Back to the previous page') ?>
            </a>
        <?php else: ?>
            <a href="<?= url('home') ?>">
                <?= _('Back to the home page') ?>
            </a>
        <?php endif; ?>
    </p>
</div>
